import React, { Component } from 'react';
import Regist from './components/Regist'
import Alert from './components/Alert'
import './App.css'
class App extends Component {
  state = {
    visible: false,
    value: {}
  }
  onSubmit = (value) => {
    this.setState({
      visible: true,
      value: value
    })

    // Alert.success({
    //   mess: `用户名： ${value.user}, 密码： ${value.pwd}`
    // })
    
  }
  render() {
    const { visible, value } = this.state
    return (
      <div>
        <Regist onSubmit={this.onSubmit}></Regist>
        { visible && <Alert message={ `用户名：${value.user}, 密码： ${value.pwd}` } type="success"></Alert> }
      </div>
    );
  }
}

export default App;
